//
//  TreasureChest.m
//  EffectDesignerDemo_iOS
//
//  Created by qilongTan on 15/7/24.
//  Copyright (c) 2015年 Marin Todorov. All rights reserved.
//

#import "TreasureChest.h"
#import "UIEffectDesignerView.h"

@implementation TreasureChest

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self viewInit];
    }
    return self;
}

-(void)viewInit
{
    self.image = [UIImage imageNamed:@"baoxiang.png"];
    UIEffectDesignerView* effectView = [UIEffectDesignerView effectWithFile:@"xingxing.ped"];
    effectView.frame = CGRectMake(0, 0, 200, 200) ;
    effectView.backgroundColor = [UIColor blueColor];
    [self addSubview:effectView];
//        effectView.bounds = self.bounds;
 
}

@end
